home *** CD-ROM | disk | FTP | other *** search
-
- {Expert program mechanic.PAS generated by PXG}
-
- {$I PXG.INC}
-
- begin
- repeat
- writeln;
- writeln('*** EXPERT MECHANIC *** (Rules from Byte, June 1985)');
- writeln;
-
- if ask('Does the engine start?') = true then
- if ask('Does the engine stall?') = true then
- if ask('Any air leaks in or around the intake manifold?') = true then
- conclude('Check the manifold')
-
- else {Any air leaks in or around the intake manifold? = false}
- if ask('Are the valves set too tight?') = true then
- conclude('Check the valves')
-
- else {Are the valves set too tight? = false}
- if ask('Are the ignition points burned, pitted, or gapped incorrectly?') = true then
- conclude('Check the points')
-
- else {Are the ignition points burned, pitted, or gapped incorrectly? = false}
- if ask('Is the idle speed set too slow?') = true then
- conclude('Adjust the idle speed')
-
- else {Is the idle speed set too slow? = false}
- conclude('Check the carb mixture')
-
- else {Does the engine stall? = false}
- if ask('Does the engine misfire?') = true then
- if ask('Are the spark plugs fouled, damaged, too hot, too cold, or gapped wrong?') = true then
- conclude('Check the plugs')
-
- else {Are the spark plugs fouled, damaged, too hot, too cold, or gapped wrong? = false}
- if ask('Is the head gasket blown?') = true then
- conclude('Change the head gasket')
-
- else {Is the head gasket blown? = false}
- if ask('Are the points burned, pitted, or incorrectly gapped?') = true then
- conclude('Check the points')
-
- else {Are the points burned, pitted, or incorrectly gapped? = false}
- if ask('Are the valves worn, sticking, or valve springs broken or weak?') = true then
- conclude('Check the valves')
-
- else {Are the valves worn, sticking, or valve springs broken or weak? = false}
- if ask('Is carburation poor due to clogged or loose jets, air leaks, or bad mixture?') = true then
- conclude('Check the carburator')
-
- else {Is carburation poor due to clogged or loose jets, air leaks, or bad mixture? = false}
- if ask('Are there any signs of free gas around the carburator?') = true then
- conclude('The float may be sticking')
-
- else {Are there any signs of free gas around the carburator? = false}
- conclude('Check the ignition timing')
-
- else {Does the engine misfire? = false}
- if ask('Does the engine lack power or performance?') = true then
- if ask('Is the ignition timing off?') = true then
- conclude('Adjust the timing')
-
- else {Is the ignition timing off? = false}
- if ask('Has vacuum advance failed?') = true then
- conclude('Fix the vacuum advance')
-
- else {Has vacuum advance failed? = false}
- if ask('Are the points burned, pitted, sticking or bouncing?') = true then
- conclude('Change the points')
-
- else {Are the points burned, pitted, sticking or bouncing? = false}
- conclude('It could be the piston rings')
-
- else {Does the engine lack power or performance? = false}
- if ask('Does the engine idle roughly?') = true then
- conclude('Check the fuel volatility')
-
- else {Does the engine idle roughly? = false}
- conclude('Check the cylinder head')
-
- else {Does the engine start? = false}
- if ask('Does the starter crank the engine?') = true then
- if ask('Are the points burned, pitted, dirty or fail to function?') = true then
- conclude('Fix the points')
-
- else {Are the points burned, pitted, dirty or fail to function? = false}
- if ask('Is the coil output weak, nonexistent?') = true then
- conclude('Change the coil')
-
- else {Is the coil output weak, nonexistent? = false}
- if ask('Is the coil resistor burned out or open?') = true then
- conclude('Change the coil')
-
- else {Is the coil resistor burned out or open? = false}
- if ask('Are the spark plugs damaged, dirty, wet, or gapped incorrectly?') = true then
- conclude('Change the spark plugs')
-
- else {Are the spark plugs damaged, dirty, wet, or gapped incorrectly? = false}
- if ask('Is the fuel pump worn, leaking, clogged or inoperative?') = true then
- conclude('Change the fuel pump')
-
- else {Is the fuel pump worn, leaking, clogged or inoperative? = false}
- if ask('Is the choke incorrectly set or inoperative?') = true then
- conclude('Fix the choke')
-
- else {Is the choke incorrectly set or inoperative? = false}
- if ask('Is it the carb float, jets or needle valve') = true then
- conclude('Fix the carburator')
-
- else {Is it the carb float, jets or needle valve = false}
- if ask('Is the distributor cap, rotor, insulator damaged or wet?') = true then
- conclude('Fix the distributor')
-
- else {Is the distributor cap, rotor, insulator damaged or wet? = false}
- if ask('Are the ignition cables cracked, wet, corroded?') = true then
- conclude('Fix the ignition cables')
-
- else {Are the ignition cables cracked, wet, corroded? = false}
- if ask('Does ignition switch remain open when key is turned?') = true then
- conclude('Replace the ignition switch or battery')
-
- else {Does ignition switch remain open when key is turned? = false}
- conclude('The problem could be in the fuel')
-
- else {Does the starter crank the engine? = false}
- if ask('Are the battery terminals loose or corroded?') = true then
- conclude('Fix the terminals')
-
- else {Are the battery terminals loose or corroded? = false}
- if ask('Does the starter motor fail to operate when power is applied directly?') = true then
- conclude('Replace the starter')
-
- else {Does the starter motor fail to operate when power is applied directly? = false}
- if ask('Does starter drive gear fail to engage flywheel?') = true then
- conclude('Replace the solenoid')
-
- else {Does starter drive gear fail to engage flywheel? = false}
- conclude('Replace the battery')
-
- until ask('Run again?') = false;
- end.
-